public class Sequence {
	public static int anInt292;
	public static Sequence[] sequences;
	public int anInt294;
	public int[] anIntArray295;
	public int[] anIntArray296;
	private int[] anIntArray297;
	public int anInt298 = -1;
	public int[] anIntArray299;
	public boolean aBoolean300 = false;
	public int anInt301 = 5;
	public int anInt302 = -1;
	public int anInt303 = -1;
	public int anInt304 = 99;
	public int anInt305 = -1;
	public int anInt306 = -1;
	public int anInt307 = 2;
	public int anInt308;
	public static int anInt309;

	public static void getValues(Archive archive) {
		Packet packet = new Packet(archive.method154(
			"seq.dat", null));
		Sequence.anInt292 = packet.getUShort();
		if (Sequence.sequences == null) {
			Sequence.sequences = new Sequence[Sequence.anInt292];
		}
		for (int i_0_ = 0; i_0_ < Sequence.anInt292; i_0_++) {
			if (Sequence.sequences[i_0_] == null) {
				Sequence.sequences[i_0_] = new Sequence();
			}
			Sequence.sequences[i_0_].method206(packet);
		}
	}

	public int method205(int i, int i_1_) {
		int i_2_ = anIntArray297[i_1_];
		if (i != 0) {
			return 1;
		}
		if (i_2_ == 0) {
			Class21 class21 = Class21.method238(anIntArray295[i_1_]);
			if (class21 != null) {
				i_2_ = anIntArray297[i_1_] = class21.anInt431;
			}
		}
		if (i_2_ == 0) {
			i_2_ = 1;
		}
		return i_2_;
	}

	public void method206(Packet packet) {
		for (;;) {
			int i_3_ = packet.getUByte();
			if (i_3_ == 0) {
				break;
			}
			if (i_3_ == 1) {
				anInt294 = packet.getUByte();
				anIntArray295 = new int[anInt294];
				anIntArray296 = new int[anInt294];
				anIntArray297 = new int[anInt294];
				for (int i_4_ = 0; i_4_ < anInt294; i_4_++) {
					anIntArray295[i_4_] = packet.getUShort();
					anIntArray296[i_4_] = packet.getUShort();
					if (anIntArray296[i_4_] == 65535) {
						anIntArray296[i_4_] = -1;
					}
					anIntArray297[i_4_] = packet.getUShort();
				}
			} else if (i_3_ == 2) {
				anInt298 = packet.getUShort();
			} else if (i_3_ == 3) {
				int i_5_ = packet.getUByte();
				anIntArray299 = new int[i_5_ + 1];
				for (int i_6_ = 0; i_6_ < i_5_; i_6_++) {
					anIntArray299[i_6_] = packet.getUByte();
				}
				anIntArray299[i_5_] = 9999999;
			} else if (i_3_ == 4) {
				aBoolean300 = true;
			} else if (i_3_ == 5) {
				anInt301 = packet.getUByte();
			} else if (i_3_ == 6) {
				anInt302 = packet.getUShort();
			} else if (i_3_ == 7) {
				anInt303 = packet.getUShort();
			} else if (i_3_ == 8) {
				anInt304 = packet.getUByte();
			} else if (i_3_ == 9) {
				anInt305 = packet.getUByte();
			} else if (i_3_ == 10) {
				anInt306 = packet.getUByte();
			} else if (i_3_ == 11) {
				anInt307 = packet.getUByte();
			} else if (i_3_ == 12) {
				anInt308 = packet.getInt();
			} else {
				System.out.println("Error unrecognised seq config code: " + i_3_);
			}
		}
		if (anInt294 == 0) {
			anInt294 = 1;
			anIntArray295 = new int[1];
			anIntArray295[0] = -1;
			anIntArray296 = new int[1];
			anIntArray296[0] = -1;
			anIntArray297 = new int[1];
			anIntArray297[0] = -1;
		}
		if (anInt305 == -1) {
			if (anIntArray299 != null) {
				anInt305 = 2;
			} else {
				anInt305 = 0;
			}
		}
		if (anInt306 == -1) {
			if (anIntArray299 != null) {
				anInt306 = 2;
			} else {
				anInt306 = 0;
			}
		}
	}
}
